<% @title = "#{@page.title} (Version ##{@version.number})" %>

<div id="contentWithoutChanges">
  <%= markup(@version.body) %>
</div>

<div id="contentWithChanges">
  <%= markup(@version.body) %>
</div>

<div class="byline">
  Created on <%= @version.created_at.to_s(:long) %>
  by <%= link_to_author(@version.author) %>
</div>

<div class="navigation">
  <%= link_to "Rollback", rollback_url(:page_title => @page, :version_number => @version.number) %>

  <% if @version.newer_versions? && @version.newer_versions.size > 1 %>
    | <%= nlink_to "Forward in time", 
            version_url(:page_title => @page.title, :version_number => @version.number + 1) %>
    <small>(<%= @version.newer_versions.size %> more)</small>

    | <%= nlink_to "See current", page_url(:page_title => @page) %>
  <% elsif @version.newer_versions? %>
    | <%= nlink_to "Forward in time", page_url(:page_title => @page) %>
    <small>(<%= @version.newer_versions.size %> more)</small>
  <% end %>

  <% if @version.older_versions? %>
    | <%= nlink_to "Back in time", 
          version_url(:page_title => @page, :version_number => @version.number - 1) %>
    <small>(<%= @version.older_versions.size %> more)</small>
  <% end %>
</div>